Repository navigation
Conversation
Contributor
dougqh
force-pushed
the
dougqh/datadog-id-views
branch
from
November 21, 2026 15:11
60b0a1f to
34e9eee
Compare
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
dougqh
force-pushed
the
dougqh/transient-values
branch
from
November 21, 2026 19:14
f476891 to
42b4292
Compare
dougqh
force-pushed
the
dougqh/datadog-id-views
branch
from
November 21, 2026 19:14
34e9eee to
06bd242
Compare
Adds parseUnsignedLong / parseLong / parseInt overloads to LongStringUtils that take the range [start, end) of a CharSequence and give the same result, or NumberFormatException, as their String counterparts on the same chars (Java 8 has no range-based CharSequence overloads of Long.parseLong / Integer.parseInt). They let a header value be parsed in place, from a view, without making a String first. parseUnsignedLong(String) now shares its 19-20 digit path with the range overload. LongStringUtilsRangeTest compares outcomes with the String parsers on edge cases (signs, Unicode digits, every length boundary, overflow) and on random input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Datadog interpreter overrides acceptTransient: the trace id, parent id and sampling priority are parsed straight from the view with LongStringUtils' range parsers, which give what the String path does for the same chars. Values that path would treat differently (comma-separated values, or a trace id whose text isn't canonical, since DDTraceId keeps the text it parsed) are copied and take it. ExtractionCache's span id check parses the value as handed too. Nothing keeps a view. ExtractorKeysForkedTest checks edge values (leading zeros, '+', commas, junk, unsigned / int limits) give the same context from views as from Strings, and that overwriting the views after extraction changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A parse-only header is parsed by the style that owns it; the other styles' interpreters only need its value if the configuration names it (a request header tag, a baggage mapping, the client IP header), so ContextInterpreter skips it without copying the view otherwise. The inferred proxy propagator reads only keys without a header constant from an indexed carrier, since a known header never has its prefix. Without these, every interpreter in a compound extraction made its own copy of each view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/datadog-id-views
branch
from
November 21, 2026 19:39
06bd242 to
11bb1c7
Compare
dougqh
force-pushed
the
dougqh/transient-values
branch
from
November 21, 2026 19:39
42b4292 to
14e69c0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
The Datadog extractor parses
x-datadog-trace-id,x-datadog-parent-idandx-datadog-sampling-prioritystraight from a transient view of the value (#13618) when a carrier hands one, instead of from a decodedString. Extracted contexts are unchanged. No carrier hands views yet (part 5, Kafka).Stacked on #13618. Part 4 of the value-views series. Includes #13616's commit (
Parse decimal numbers from a CharSequence range), cherry-picked because #13616 is based on master; it drops out on rebase once #13616 lands.Additional Notes
DatadogContextInterpreter.acceptTransient: for its three parse-only headers, parses the view withLongStringUtils.parseUnsignedLong/parseIntover the range (Parse decimal numbers from a CharSequence range #13616), which give whatDDTraceId.from/DDSpanId.from/Integer.parseIntgive for the same chars. Errors invalidate the context as before.Stringpath would treat differently is copied and takes that path: one with a comma (firstHeaderValuekeeps the part before it), or a trace id whose text isn't canonical (leading+or zero), sinceDDTraceIdkeeps the text it parsed and could print it back.ExtractionCache's span id check parses the value as handed (view orString) with the same range parser.ContextInterpreter.acceptTransientskips it without copying otherwise; the inferred proxy propagator reads only keys without a header constant from an indexed carrier. Without this, every interpreter in a compound extraction made its own copy of each view, which allocated more than decoding once.ExtractorKeysForkedTest): for the Datadog extractor and the compound Datadog + W3C extractor, edge values (leading zeros,+, commas, junk,0, unsigned and int limits, overflow) give the same context from views as fromStrings; and overwriting every view after extraction leaves the context unchanged (nothing kept a view). With the earlier checks: 47 tests.🤖 Generated with Claude Code